Application

A base class for Adwaita applications.

AdwApplication handles library initialization by calling [func@init] in the default [signal@Gio.Application::startup] signal handler, in turn chaining up as required by [class@Gtk.Application]. Therefore, any subclass of AdwApplication should always chain up its startup handler before using any Adwaita or GTK API.

Automatic Resources

AdwApplication will automatically load stylesheets located in the application's resource base path (see [method@Gio.Application.set_resource_base_path], if they're present.

They can be used to add custom styles to the application, as follows:

- style.css contains styles that are always present.

- style-dark.css contains styles only used when [property@StyleManager:dark] is TRUE.

- style-hc.css contains styles used when the system high contrast preference is enabled.

- style-hc-dark.css contains styles used when the system high contrast preference is enabled and [property@StyleManager:dark] is TRUE.

Constructors

this
this(AdwApplication* adwApplication, bool ownedRef)

Sets our main struct and passes it to the parent class.

this
this(string applicationId, GApplicationFlags flags)

Creates a new AdwApplication.

Members

Functions

getAdwApplicationStruct
AdwApplication* getAdwApplicationStruct(bool transferOwnership)

Get the main Gtk struct

getStruct
void* getStruct()

the main Gtk struct as a void*

getStyleManager
StyleManager getStyleManager()

Gets the style manager for @self.

Static functions

getType
GType getType()

Variables

adwApplication
AdwApplication* adwApplication;

the main Gtk struct

Meta